<template>
      <el-button
        @click="cancel"
      >
       取消
      </el-button>
    </el-col>
</template>

<script>
export default {
    //业务类型的按钮 根据单据状态进行判断
    name:"CacelButton",
  methods:{
      cancel(){
          this.$store.dispatch("tagsView/delVisitedView", {
            path: this.$route.fullPath
          });
          if(this.$store.state.tagsView.visitedViews){
          const {fullPath}=this.$store.state.tagsView.visitedViews[this.$store.state.tagsView.visitedViews.length-1]
          this.$router.push(fullPath)
          }
          
      }

  }
};
</script>         